package org.apache.rocketmq.console.script.dao;

import java.util.List;

import org.apache.rocketmq.console.script.model.ScriptInfo;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

public interface ScriptInfoDao extends CrudRepository<ScriptInfo, Integer> {
	@Query("select e from ScriptInfo e ORDER BY e.updateDate,e.createDate DESC")
	List<ScriptInfo> findAll();

	ScriptInfo findOneById(int id);

	List<ScriptInfo> findByRegionCode(String regionCode);

}